package com.cloud.screen.api.controller;


import com.cloud.screen.api.service.HumanInfoService;
import com.cloud.screen.common.result.Quokka;
import com.cloud.screen.interfaces.FeignClientSystem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("screen/api/patrolStat")
public class PatrolStatController {

    @Autowired
    private FeignClientSystem feignClientSystem;

    @Autowired
    private HumanInfoService humanInfoService;


    /**
     * 执法人员学历统计
     *
     * @return
     */
    @RequestMapping("getPatrolEduStat")
    public Quokka getPatrolEduStat(Integer isSupervise) {
        return new Quokka(true, feignClientSystem.getPatrolEduStat(isSupervise));
    }

    /**
     * 执法人员性质统计
     *
     * @return
     */
    @RequestMapping("getPatrolNatureStat")
    public Quokka getPatrolNatureStat() {
        return new Quokka(true, feignClientSystem.getPatrolNatureStat());
    }

    /**
     * 执法类型统计
     *
     * @return
     */
    @RequestMapping("getPatrolLawTypeStat")
    public Quokka getPatrolLawTypeStat() {
        return new Quokka(true, feignClientSystem.getPatrolLawTypeStat());
    }

    /**
     * 执法队员性别统计
     *
     * @return
     */
    @RequestMapping("getPatrolGenderStat")
    public Quokka getPatrolGenderStat(Integer isSupervise) {
        return new Quokka(true, feignClientSystem.getPatrolGenderStat(isSupervise));
    }

    /**
     * 执法队员区域统计
     *
     * @return
     */
    @RequestMapping("getPatrolAreaStat")
    public Quokka getPatrolAreaStat(Integer isSupervise) {
        return new Quokka(true, feignClientSystem.getPatrolAreaStat(isSupervise));
    }

    /**
     * 执法证统计
     *
     * @return
     */
    @RequestMapping("getPatrolCardStat")
    public Quokka getPatrolCardStat() {
        return new Quokka(true, feignClientSystem.getPatrolCardStat());
    }


    /**
     * 是否拥有执法证统计
     *
     * @return
     */
    @RequestMapping("getLawyerStat")
    public Quokka getLawyerStat() {
        return new Quokka(true, feignClientSystem.getLawyerStat());
    }


    /**
     * 是否公职律师统计
     *
     * @return
     */
    @RequestMapping("getObtainLawCardStat")
    public Quokka getObtainLawCardStat() {
        return new Quokka(true, feignClientSystem.getObtainLawCardStat());
    }

    /**
     * 执法队员区域统计-大屏
     *
     * @return
     */
    @RequestMapping("getPatrolAreaStatForScreen")
    public Quokka getPatrolAreaStatForScreen(Integer isSupervise,Long regionid) {
        return new Quokka(true, feignClientSystem.getPatrolAreaStatForScreen(isSupervise,regionid));
    }

    /**
     * 监督人员所属机构-大屏
     *
     * @return
     */
    @RequestMapping("getPatrolOrganization")
    public Quokka getPatrolOrganization(Long regionid) {
        return new Quokka(true, humanInfoService.getPatrolOrganization(regionid));
    }

    /**
     * 监督机构工作情况-大屏
     *
     * @return
     */
    @RequestMapping("getPatrolAuthorityEnforcement")
    public Quokka getPatrolAuthorityEnforcement(Long regionid) {
        return new Quokka(true, humanInfoService.getPatrolAuthorityEnforcement(regionid));
    }

    /**
     * 悬浮窗-大屏
     *
     * @return
     */
    @RequestMapping("getInfoGeneral")
    public Quokka getInfoGeneral(Long regionid) {
        return new Quokka(true, humanInfoService.getInfoGeneral(regionid));
    }

    /**
     * 执法机关、执法主体 工作情况-大屏
     *
     * @return
     */
    @RequestMapping("getInfoUnitSummary")
    public Quokka getInfoUnitSummary(Integer isSupervise,Long regionid) {
        return new Quokka(true, humanInfoService.getInfoUnitSummary(isSupervise,regionid));
    }

    /**
     * 执法机关、监管层级-大屏
     *
     * @return
     */
    @RequestMapping("getInfoUnitSupLevel")
    public Quokka getInfoUnitSupLevel(Long regionid) {
        return new Quokka(true, humanInfoService.getInfoUnitSupLevel(regionid));
    }

    /**
     * 行业机构涉及领域TOP5
     *
     * @return
     */
    @RequestMapping("getInfoAuthorityDomain")
    public Quokka getInfoAuthorityDomain(Integer isSupervise,Long regionid) {
        return new Quokka(true, humanInfoService.getInfoAuthorityDomain(isSupervise,regionid));
    }

    /**
     * 行业人员涉及领域TOP5
     *
     * @return
     */
    @RequestMapping("getInfoAuthorityPeopleDomain")
    public Quokka getInfoAuthorityPeopleDomain(Integer userType,Long regionid) {
        return new Quokka(true, humanInfoService.getInfoAuthorityPeopleDomain(userType,regionid));
    }
    /**
     * 执法机关 垂管机关 统计
     *
     * @return
     */
    @RequestMapping("getInfoSubjectLevel")
    public Quokka getInfoSubjectLevel(Long regionid) {
        return new Quokka(true, humanInfoService.getInfoSubjectLevel(regionid));
    }

    /**
     * 执法机关类别 统计
     *
     * @return
     */
    @RequestMapping("getInfoSubjectType")
    public Quokka getInfoSubjectType(Long regionid) {
        return new Quokka(true, humanInfoService.getInfoSubjectType(regionid));
    }
}
